
<!doctype html>
<html lang="zh" class="no-js">
  <head>
    
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width,initial-scale=1">
      
      
      
      
      <link rel="icon" href="../../assets/images/favicon.png">
      <meta name="generator" content="mkdocs-1.2.2, mkdocs-material-7.1.11">
    
    
      
        <title>后端请求API - Zjvis</title>
      
    
    
      <link rel="stylesheet" href="../../assets/stylesheets/main.3754935a.min.css">
      
        
        <link rel="stylesheet" href="../../assets/stylesheets/palette.f1a3b89f.min.css">
        
          
          
          <meta name="theme-color" content="#4051b5">
        
      
    
    
    
      
        
        <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
        <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono&display=fallback">
        <style>:root{--md-text-font-family:"Roboto";--md-code-font-family:"Roboto Mono"}</style>
      
    
    
    
      <link rel="stylesheet" href="../../assets/css/simpleLightbox.min.css">
    
      <link rel="stylesheet" href="../../assets/css/lightbox.css">
    
    
      


    
    
  </head>
  
  
    
    
    
    
    
    <body dir="ltr" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo">
  
    
    <script>function __prefix(e){return new URL("../..",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script>
    
    <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
    <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
    <label class="md-overlay" for="__drawer"></label>
    <div data-md-component="skip">
      
        
        <a href="#api" class="md-skip">
          跳转至
        </a>
      
    </div>
    <div data-md-component="announce">
      
    </div>
    
      <header class="md-header" data-md-component="header">
  <nav class="md-header__inner md-grid" aria-label="Header">
    <a href="../.." title="Zjvis" class="md-header__button md-logo" aria-label="Zjvis" data-md-component="logo">
      
  
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>

    </a>
    <label class="md-header__button md-icon" for="__drawer">
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg>
    </label>
    <div class="md-header__title" data-md-component="header-title">
      <div class="md-header__ellipsis">
        <div class="md-header__topic">
          <span class="md-ellipsis">
            Zjvis
          </span>
        </div>
        <div class="md-header__topic" data-md-component="header-topic">
          <span class="md-ellipsis">
            
              后端请求API
            
          </span>
        </div>
      </div>
    </div>
    
    
    
      <label class="md-header__button md-icon" for="__search">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
      </label>
      
<div class="md-search" data-md-component="search" role="dialog">
  <label class="md-search__overlay" for="__search"></label>
  <div class="md-search__inner" role="search">
    <form class="md-search__form" name="search">
      <input type="text" class="md-search__input" name="query" aria-label="搜索" placeholder="搜索" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
      <label class="md-search__icon md-icon" for="__search">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
      </label>
      <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>
      </button>
    </form>
    <div class="md-search__output">
      <div class="md-search__scrollwrap" data-md-scrollfix>
        <div class="md-search-result" data-md-component="search-result">
          <div class="md-search-result__meta">
            正在初始化搜索引擎
          </div>
          <ol class="md-search-result__list"></ol>
        </div>
      </div>
    </div>
  </div>
</div>
    
    
      <div class="md-header__source">
        
<a href="https://github.com/iGame-Lab/zjvis/" title="前往 GitHub 仓库" class="md-source" data-md-component="source">
  <div class="md-source__icon md-icon">
    
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
  </div>
  <div class="md-source__repository">
    Github
  </div>
</a>
      </div>
    
  </nav>
</header>
    
    <div class="md-container" data-md-component="container">
      
      
        
          
<nav class="md-tabs" aria-label="Tabs" data-md-component="tabs">
  <div class="md-tabs__inner md-grid">
    <ul class="md-tabs__list">
      
        
  
  


  <li class="md-tabs__item">
    <a href="../.." class="md-tabs__link">
      首页
    </a>
  </li>

      
        
  
  


  
  
  
    <li class="md-tabs__item">
      <a href="../../quick_start/install/" class="md-tabs__link">
        快速使用
      </a>
    </li>
  

      
        
  
  


  
  
  
    <li class="md-tabs__item">
      <a href="../../write_log/write_graph/" class="md-tabs__link">
        可视化日志写入
      </a>
    </li>
  

      
        
  
  


  
  
  
    <li class="md-tabs__item">
      <a href="../../use_visualization/graph/" class="md-tabs__link">
        使用可视化模块
      </a>
    </li>
  

      
        
  
  
    
  


  
  
  
    <li class="md-tabs__item">
      <a href="./" class="md-tabs__link md-tabs__link--active">
        开发者文档
      </a>
    </li>
  

      
        
  
  


  
  
  
    <li class="md-tabs__item">
      <a href="../../thanks/license/" class="md-tabs__link">
        致谢
      </a>
    </li>
  

      
    </ul>
  </div>
</nav>
        
      
      <main class="md-main" data-md-component="main">
        <div class="md-main__inner md-grid">
          
            
              
              <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
                <div class="md-sidebar__scrollwrap">
                  <div class="md-sidebar__inner">
                    

  


<nav class="md-nav md-nav--primary md-nav--lifted" aria-label="Navigation" data-md-level="0">
  <label class="md-nav__title" for="__drawer">
    <a href="../.." title="Zjvis" class="md-nav__button md-logo" aria-label="Zjvis" data-md-component="logo">
      
  
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>

    </a>
    Zjvis
  </label>
  
    <div class="md-nav__source">
      
<a href="https://github.com/iGame-Lab/zjvis/" title="前往 GitHub 仓库" class="md-source" data-md-component="source">
  <div class="md-source__icon md-icon">
    
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
  </div>
  <div class="md-source__repository">
    Github
  </div>
</a>
    </div>
  
  <ul class="md-nav__list" data-md-scrollfix>
    
      
      
      

  
  
  
    <li class="md-nav__item">
      <a href="../.." class="md-nav__link">
        首页
      </a>
    </li>
  

    
      
      
      

  
  
  
    
    <li class="md-nav__item md-nav__item--nested">
      
      
        <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_2" type="checkbox" id="__nav_2" >
      
      <label class="md-nav__link" for="__nav_2">
        快速使用
        <span class="md-nav__icon md-icon"></span>
      </label>
      <nav class="md-nav" aria-label="快速使用" data-md-level="1">
        <label class="md-nav__title" for="__nav_2">
          <span class="md-nav__icon md-icon"></span>
          快速使用
        </label>
        <ul class="md-nav__list" data-md-scrollfix>
          
            
  
  
  
    <li class="md-nav__item">
      <a href="../../quick_start/install/" class="md-nav__link">
        安装
      </a>
    </li>
  

          
            
  
  
  
    <li class="md-nav__item">
      <a href="../../quick_start/quickstart/" class="md-nav__link">
        快速上手
      </a>
    </li>
  

          
            
  
  
  
    <li class="md-nav__item">
      <a href="../../quick_start/run_visual/" class="md-nav__link">
        启动可视化并在浏览器中查看
      </a>
    </li>
  

          
        </ul>
      </nav>
    </li>
  

    
      
      
      

  
  
  
    
    <li class="md-nav__item md-nav__item--nested">
      
      
        <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" >
      
      <label class="md-nav__link" for="__nav_3">
        可视化日志写入
        <span class="md-nav__icon md-icon"></span>
      </label>
      <nav class="md-nav" aria-label="可视化日志写入" data-md-level="1">
        <label class="md-nav__title" for="__nav_3">
          <span class="md-nav__icon md-icon"></span>
          可视化日志写入
        </label>
        <ul class="md-nav__list" data-md-scrollfix>
          
            
  
  
  
    <li class="md-nav__item">
      <a href="../../write_log/write_graph/" class="md-nav__link">
        模型结构
      </a>
    </li>
  

          
            
  
  
  
    <li class="md-nav__item">
      <a href="../../write_log/write_scalar/" class="md-nav__link">
        标量数据
      </a>
    </li>
  

          
            
  
  
  
    <li class="md-nav__item">
      <a href="../../write_log/write_media/" class="md-nav__link">
        媒体数据
      </a>
    </li>
  

          
            
  
  
  
    <li class="md-nav__item">
      <a href="../../write_log/write_statistic/" class="md-nav__link">
        统计分析数据
      </a>
    </li>
  

          
            
  
  
  
    <li class="md-nav__item">
      <a href="../../write_log/write_embedding/" class="md-nav__link">
        降维分析数据
      </a>
    </li>
  

          
            
  
  
  
    <li class="md-nav__item">
      <a href="../../write_log/write_hyperparm/" class="md-nav__link">
        超参数
      </a>
    </li>
  

          
            
  
  
  
    <li class="md-nav__item">
      <a href="../../write_log/write_exception/" class="md-nav__link">
        异常检测数据
      </a>
    </li>
  

          
        </ul>
      </nav>
    </li>
  

    
      
      
      

  
  
  
    
    <li class="md-nav__item md-nav__item--nested">
      
      
        <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" >
      
      <label class="md-nav__link" for="__nav_4">
        使用可视化模块
        <span class="md-nav__icon md-icon"></span>
      </label>
      <nav class="md-nav" aria-label="使用可视化模块" data-md-level="1">
        <label class="md-nav__title" for="__nav_4">
          <span class="md-nav__icon md-icon"></span>
          使用可视化模块
        </label>
        <ul class="md-nav__list" data-md-scrollfix>
          
            
  
  
  
    <li class="md-nav__item">
      <a href="../../use_visualization/graph/" class="md-nav__link">
        模型结构
      </a>
    </li>
  

          
            
  
  
  
    <li class="md-nav__item">
      <a href="../../use_visualization/scalar/" class="md-nav__link">
        标量数据
      </a>
    </li>
  

          
            
  
  
  
    <li class="md-nav__item">
      <a href="../../use_visualization/media/" class="md-nav__link">
        媒体数据
      </a>
    </li>
  

          
            
  
  
  
    <li class="md-nav__item">
      <a href="../../use_visualization/statistic/" class="md-nav__link">
        统计分析
      </a>
    </li>
  

          
            
  
  
  
    <li class="md-nav__item">
      <a href="../../use_visualization/embedding/" class="md-nav__link">
        降维分析
      </a>
    </li>
  

          
            
  
  
  
    <li class="md-nav__item">
      <a href="../../use_visualization/hyperparm/" class="md-nav__link">
        超参分析
      </a>
    </li>
  

          
            
  
  
  
    <li class="md-nav__item">
      <a href="../../use_visualization/exception/" class="md-nav__link">
        异常检测
      </a>
    </li>
  

          
            
  
  
  
    <li class="md-nav__item">
      <a href="../../use_visualization/custom/" class="md-nav__link">
        用户定制
      </a>
    </li>
  

          
        </ul>
      </nav>
    </li>
  

    
      
      
      

  
  
    
  
  
    
    <li class="md-nav__item md-nav__item--active md-nav__item--nested">
      
      
        <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" checked>
      
      <label class="md-nav__link" for="__nav_5">
        开发者文档
        <span class="md-nav__icon md-icon"></span>
      </label>
      <nav class="md-nav" aria-label="开发者文档" data-md-level="1">
        <label class="md-nav__title" for="__nav_5">
          <span class="md-nav__icon md-icon"></span>
          开发者文档
        </label>
        <ul class="md-nav__list" data-md-scrollfix>
          
            
  
  
    
  
  
    <li class="md-nav__item md-nav__item--active">
      
      <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
      
      
        
      
      
        <label class="md-nav__link md-nav__link--active" for="__toc">
          后端请求API
          <span class="md-nav__icon md-icon"></span>
        </label>
      
      <a href="./" class="md-nav__link md-nav__link--active">
        后端请求API
      </a>
      
        
<nav class="md-nav md-nav--secondary" aria-label="目录">
  
  
  
    
  
  
    <label class="md-nav__title" for="__toc">
      <span class="md-nav__icon md-icon"></span>
      目录
    </label>
    <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
      
        <li class="md-nav__item">
  <a href="#_1" class="md-nav__link">
    简介
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#_2" class="md-nav__link">
    初始请求
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#_3" class="md-nav__link">
    类目信息
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#scalar" class="md-nav__link">
    标量信息Scalar
  </a>
  
</li>
      
    </ul>
  
</nav>
      
    </li>
  

          
            
  
  
  
    <li class="md-nav__item">
      <a href="../frontend/" class="md-nav__link">
        可视化前端
      </a>
    </li>
  

          
            
  
  
  
    <li class="md-nav__item">
      <a href="../commandline_for_backend/" class="md-nav__link">
        可视化后端启动选项
      </a>
    </li>
  

          
            
  
  
  
    <li class="md-nav__item">
      <a href="../bugs/" class="md-nav__link">
        Bug反馈
      </a>
    </li>
  

          
        </ul>
      </nav>
    </li>
  

    
      
      
      

  
  
  
    
    <li class="md-nav__item md-nav__item--nested">
      
      
        <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" >
      
      <label class="md-nav__link" for="__nav_6">
        致谢
        <span class="md-nav__icon md-icon"></span>
      </label>
      <nav class="md-nav" aria-label="致谢" data-md-level="1">
        <label class="md-nav__title" for="__nav_6">
          <span class="md-nav__icon md-icon"></span>
          致谢
        </label>
        <ul class="md-nav__list" data-md-scrollfix>
          
            
  
  
  
    <li class="md-nav__item">
      <a href="../../thanks/license/" class="md-nav__link">
        开源软件
      </a>
    </li>
  

          
        </ul>
      </nav>
    </li>
  

    
  </ul>
</nav>
                  </div>
                </div>
              </div>
            
            
              
              <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
                <div class="md-sidebar__scrollwrap">
                  <div class="md-sidebar__inner">
                    
<nav class="md-nav md-nav--secondary" aria-label="目录">
  
  
  
    
  
  
    <label class="md-nav__title" for="__toc">
      <span class="md-nav__icon md-icon"></span>
      目录
    </label>
    <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
      
        <li class="md-nav__item">
  <a href="#_1" class="md-nav__link">
    简介
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#_2" class="md-nav__link">
    初始请求
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#_3" class="md-nav__link">
    类目信息
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#scalar" class="md-nav__link">
    标量信息Scalar
  </a>
  
</li>
      
    </ul>
  
</nav>
                  </div>
                </div>
              </div>
            
          
          <div class="md-content" data-md-component="content">
            <article class="md-content__inner md-typeset">
              
                
                  <a href="https://github.com/iGame-Lab/zjvis/blob/master/docs/developer/api.md" title="编辑此页" class="md-content__button md-icon">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z"/></svg>
                  </a>
                
                
                <h1 id="api">后端请求API</h1>
<h2 id="_1">简介</h2>
<p>Zjvis在设计和开发方式上采用RESTful风格，前后端分离，对外提供的是数据资源的访问接口。</p>
<h2 id="_2">初始请求</h2>
<div class="admonition 资源访问路径">
<p class="admonition-title">资源访问路径</p>
<div class="highlight"><pre><span></span><code>/api/init
</code></pre></div>
</div>
<p>当用户首次打开zjvis前端页面时，需要先访问后端初始化API。该API会通知后端解析用户指定路径的日志文件。
待后端完成全部的日志解析后，则返回：
<div class="highlight"><pre><span></span><code>{&quot;code&quot;: 200, &quot;msg&quot;: &quot;ok&quot;, &quot;data&quot;: {&quot;msg&quot;: &quot;success&quot;}}
</code></pre></div></p>
<p>由于深度学习程序导出的日志体积较大，一直等待解析完成对用户极不友好，所以该接口最多等待30s后会强制返回结果。</p>
<h2 id="_3">类目信息</h2>
<div class="admonition 资源访问路径">
<p class="admonition-title">资源访问路径</p>
<div class="highlight"><pre><span></span><code>/api/getCategory
</code></pre></div>
</div>
<p>在初始化完成后，需请求类目信息。该接口返回当前可视化日志中所有类目的标签(tag)，若日志中不存在某一类目信息，则返回空数组。</p>
<p>其中模型结构<code>graph</code>的tag信息固定为<code>s_graph</code>与<code>c_graph</code>，<code>s_graph</code>表示结构图而<code>c_graph</code>表示结构图；
超参数没有tag，若日志中含有超参数则返回tag值为<code>true</code></p>
<p>该接口返回数据格式如下：</p>
<div class="highlight"><pre><span></span><code><span class="p">{</span>
  <span class="nt">&quot;runname1&quot;</span><span class="p">:</span> <span class="p">{</span>
    <span class="nt">&quot;scalar&quot;</span><span class="p">:</span> <span class="p">{</span><span class="nt">&quot;scalar&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;scalar_tag1&quot;</span><span class="p">,</span> <span class="err">...</span><span class="p">]},</span> 
    <span class="nt">&quot;media&quot;</span><span class="p">:</span> <span class="p">{</span>
      <span class="nt">&quot;image&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;image_tag1&quot;</span><span class="p">,</span> <span class="err">...</span><span class="p">],</span> 
      <span class="nt">&quot;audio&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;audio_tag1&quot;</span><span class="p">,</span> <span class="err">...</span><span class="p">],</span> 
      <span class="nt">&quot;text&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;text_tag1&quot;</span><span class="p">,</span> <span class="err">...</span><span class="p">]</span>
    <span class="p">},</span>
    <span class="nt">&quot;statistic&quot;</span><span class="p">:</span> <span class="p">{</span><span class="nt">&quot;histogram&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;histogram_tag1&quot;</span><span class="p">,</span> <span class="err">...</span><span class="p">]},</span> 
    <span class="nt">&quot;graph&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;c_graph&quot;</span><span class="p">],</span>
  <span class="p">},</span>
  <span class="nt">&quot;runname2&quot;</span><span class="p">:</span> <span class="p">{</span>
    <span class="nt">&quot;scalar&quot;</span><span class="p">:</span> <span class="p">{</span>
      <span class="nt">&quot;epoch_loss&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;epoch_loss&quot;</span><span class="p">],</span> 
      <span class="nt">&quot;epoch_accuracy&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;epoch_accuracy&quot;</span><span class="p">]</span>
    <span class="p">},</span>
    <span class="nt">&quot;graph&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;c_graph&quot;</span><span class="p">,</span> <span class="s2">&quot;s_graph&quot;</span><span class="p">],</span>
    <span class="nt">&quot;embedding&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;embedding_tag1&quot;</span><span class="p">,</span> <span class="err">...</span><span class="p">],</span>
    <span class="nt">&quot;hparams&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;true&quot;</span><span class="p">],</span>
    <span class="nt">&quot;custom&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;true&quot;</span><span class="p">]</span>
  <span class="p">}</span>
<span class="p">}</span>
</code></pre></div>
<h2 id="scalar">标量信息Scalar</h2>
<div class="admonition 资源访问路径">
<p class="admonition-title">资源访问路径</p>
<div class="highlight"><pre><span></span><code>/api/scalar?run={run}&amp;tag={tag}
</code></pre></div>
</div>
<p>请求标量数据需要提供参数<code>run</code>和<code>tag</code>，其中<code>run</code>与<code>tag</code>缺一不可，这两个参数都分别对应<code>类目信息</code>一节中的类目信息的返回。</p>
<p>例如请求<code>api/scalar?run=.&amp;tag=layer1/weights/summaries/mean</code>表示得到<code>run=.</code>，<code>tag=layer1/weights/summaries/mean</code>的标量数据。</p>
<p>该接口返回数据格式如下：</p>
<div class="highlight"><pre><span></span><code>{
  &quot;scalar_tag&quot;: 
  [
    {&quot;wall_time&quot;: 1587176310.3070214, &quot;step&quot;: 0, &quot;value&quot;: -6.488610961241648e-05}, 
                                        ..., 
    {&quot;wall_time&quot;: 1587176425.348953, &quot;step&quot;: 190, &quot;value&quot;: -0.002039810409769416}
  ]
}
</code></pre></div>
                
              
              
                


              
            </article>
          </div>
        </div>
        
      </main>
      
        
<footer class="md-footer">
  
    <nav class="md-footer__inner md-grid" aria-label="Footer">
      
        
        <a href="../../use_visualization/custom/" class="md-footer__link md-footer__link--prev" aria-label="上一页: 用户定制" rel="prev">
          <div class="md-footer__button md-icon">
            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
          </div>
          <div class="md-footer__title">
            <div class="md-ellipsis">
              <span class="md-footer__direction">
                上一页
              </span>
              用户定制
            </div>
          </div>
        </a>
      
      
        
        <a href="../frontend/" class="md-footer__link md-footer__link--next" aria-label="下一页: 可视化前端" rel="next">
          <div class="md-footer__title">
            <div class="md-ellipsis">
              <span class="md-footer__direction">
                下一页
              </span>
              可视化前端
            </div>
          </div>
          <div class="md-footer__button md-icon">
            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg>
          </div>
        </a>
      
    </nav>
  
  <div class="md-footer-meta md-typeset">
    <div class="md-footer-meta__inner md-grid">
      <div class="md-footer-copyright">
        
          <div class="md-footer-copyright__highlight">
            Copyright &copy; 2015 - 2021 <a href="http://igame.hdu.edu.cn/" target="_blank">iGame</a> & <a href="https://www.zhejianglab.com/"  target="_blank">Zhejiang Lab</a>
          </div>
        
        Made with
        <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
          Material for MkDocs
        </a>
        
      </div>
      
    </div>
  </div>
</footer>
      
    </div>
    <div class="md-dialog" data-md-component="dialog">
      <div class="md-dialog__inner md-typeset"></div>
    </div>
    <script id="__config" type="application/json">{"base": "../..", "features": ["navigation.tabs", "content.tabs.link"], "translations": {"clipboard.copy": "\u590d\u5236", "clipboard.copied": "\u5df2\u590d\u5236", "search.config.lang": "ja", "search.config.pipeline": "trimmer, stemmer", "search.config.separator": "[\\uff0c\\u3002]+", "search.placeholder": "\u641c\u7d22", "search.result.placeholder": "\u952e\u5165\u4ee5\u5f00\u59cb\u641c\u7d22", "search.result.none": "\u6ca1\u6709\u627e\u5230\u7b26\u5408\u6761\u4ef6\u7684\u7ed3\u679c", "search.result.one": "\u627e\u5230 1 \u4e2a\u7b26\u5408\u6761\u4ef6\u7684\u7ed3\u679c", "search.result.other": "# \u4e2a\u7b26\u5408\u6761\u4ef6\u7684\u7ed3\u679c", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "../../assets/javascripts/workers/search.477d984a.min.js", "version": null}</script>
    
    
      <script src="../../assets/javascripts/bundle.ddd52ceb.min.js"></script>
      
        <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
      
        <script src="../../assets/js/simpleLightbox.min.js"></script>
      
        <script src="../../assets/js/lightbox.js"></script>
      
    
  </body>
</html>